< previous page page_574 next page >

Page 574
9f31265bb40b592b1929e18a47ab28e5.gif
   ' Get Version Information
   mstrOS = mstrOS & " Version: " & _
                     typOS.dwMajorVersion & "." & _
                     typOS.dwMinorVersion & _
                     "  Build: " & _
                     (typOS.dwBuildNumber And &HFFFF&)

End Sub
Not only can you retrieve the version of the operating system your application is running on, but you can also retrieve the version number, the build number, and the platform ID.
Memory and CPU Properties
To retrieve memory and CPU information, you need to make two different API calls. These calls are in the GetSysInfo() method. Each Property Get procedure calls the GetSysInfo() method. Heres the code:
9f31265bb40b592b1929e18a47ab28e5.gif
Public Property Get TotalPhysical() As Long
   Call GetSysInfo
   TotalPhysical = mlngTotalPhysical
End Property

Public Property Get TotalVirtual() As Long
   Call GetSysInfo
   TotalVirtual = mlngTotalVirtual
End Property

Public Property Get AvailVirtual() As Long
   Call GetSysInfo
   AvailVirtual = mlngAvailVirtual
End Property

Public Property Get AvailPhysical() As Long
   Call GetSysInfo
   AvailPhysical = mlngAvailPhysical
End Property

Public Property Get CPUType() As Long
   Call GetSysInfo

 
< previous page page_574 next page >

If you like this book, buy it!